package jd.d20211009.t2;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.HashSet;

/**
 * @author habitplus
 * @since 2021-10-09 20:12
 */
public class Main {
    static final StreamTokenizer st =
            new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

    static int nextInt() {
        try {
            st.nextToken();
        } catch (IOException e) {
            e.printStackTrace();
        }
        return (int) st.nval;
    }

    public static void main(String[] args) {
        int n = nextInt();
        int k = nextInt();
        int d = nextInt();
        int[][] aa = new int[n][2];
        int[] b = new int[n];
        int[] c = new int[n];
        for (int i = 0; i < n; i++) {
            aa[i][0] = nextInt();
            aa[i][1] = i;
        }
        for (int i = 0; i < n; i++) b[i] = nextInt();
        for (int i = 0; i < n; i++) c[i] = nextInt();

        Arrays.sort(aa, (o1, o2) -> o1[0] - o2[0]);
        int[][] a = new int[n][2];
        for (int i = 1; i <= n; i++) {
            a[aa[i - 1][1]][0] = i;
            a[aa[i - 1][1]][1] = aa[i - 1][0];
        }

        aa = null;

        // 计算能领养的狗狗
        HashSet<Integer> rr = new HashSet<>();
        for (int i = 0; i < n; i++) {
            if (k >= b[i]) {
                rr.add(i);
            }
        }

        if (rr.isEmpty()) {
            System.out.println(-1);
            return;
        }

        int fav = -1;
        // 计算能喂养的狗狗
        for (int i = 0; i < n; i++) {
            long cmp = (long) d * a[i][0] - (long) c[i] * n;
            if (cmp >= 0 && rr.contains(i)) {
                fav = Math.max(a[i][1], fav);
            }
        }

        System.out.println(fav);
    }

}
